package com.wmh.baseservice.skd.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wmh.baseservice.skd.pojo.SkdBankCard;
import com.wmh.baseservice.skd.service.SkdBankCardService;
import com.wmh.baseservice.skd.mapper.SkdBankCardMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
* @author CH
* @description 针对表【skd_bank_card】的数据库操作Service实现
* @createDate 2024-01-23 11:09:15
*/
@Service
public class SkdBankCardServiceImpl extends ServiceImpl<SkdBankCardMapper, SkdBankCard>
    implements SkdBankCardService{

    @Resource
    private SkdBankCardMapper skdBankCardMapper;

    /**
     * 根据用户id银行卡信息
     * @param usId 用户id
     * @return 返回银行卡信息
     */
    @Override
    public SkdBankCard getByUserId(Long usId) {
        return skdBankCardMapper.getByUserId(usId);
    }

    /**
     * 根据持卡人和银行卡号码获取银行卡id
     * @param cardholder 持卡人
     * @param bankCardNumber 银行卡号码
     * @return 返回银行卡id
     */
    @Override
    public Long getBankCardIdByCardholderAndBankCardNumber(String cardholder, String bankCardNumber) {
        return skdBankCardMapper.getBankCardIdByCardholderAndBankCardNumber(cardholder, bankCardNumber);
    }
}




